# ---------------------------------------------------------------------------------------------------- #
# _Fariss_Validity_README.txt
# ---------------------------------------------------------------------------------------------------- #

 Date: 2016-12-01

 Authors: Christopher J. Fariss

 Title: Are Things Really Getting Better?: How To Validate Latent Variable Models of Human Rights

 Contact: 
   Chris Fariss: cjf0006@gmail.com

 Copyright (c) 2016, under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
 For more information see: http://creativecommons.org/licenses/by-nc-sa/3.0/us/
 All rights reserved. 


# ---------------------------------------------------------------------------------------------------- #
# install R and necessary packages for analysis
# ---------------------------------------------------------------------------------------------------- #

open the .R file using any text or source code editor such as:
	TextEdit, emacs, Aquamacs, notepad++ , or Xpad

set the working directory to the folder containing the data files 

the set working directory command in R is setwd()
	type ?setwd for help documentation 

to set the path type into R: 

setwd("PATH_NAME")

where PATH_NAME is the path to the folder with the data

install packages if necessary:
	install.packages("MASS")
	install.packages("foreign")
	install.packages("reshape")
	install.packages("xtable")
	install.packages("rjags")

You should place the folders that contain this file and the additional folders it contains into the R working directory. 

The R working directory is available via the getwd() function in R.

The attached code makes use of the file structure. As long as the folders are in the R working directory the script will find these files and work properly. 

The last version of R and Mac OS-X are:

	R version 3.1.1 (2014-07-10) -- "Sock it to Me"
	Copyright (C) 2014 The R Foundation for Statistical Computing
	Platform: x86_64-apple-darwin10.8.0 (64-bit)

The rjags library will only install after the successful installation of JAGS, which can be downloaded here: http://mcmc-jags.sourceforge.net/


# ---------------------------------------------------------------------------------------------------- #
# file descriptions
# ---------------------------------------------------------------------------------------------------- #

	CYEstimateLatentHRtreaty04.csv --- data file that contains the latent treaty estimates 	CYLatentRepressionConstantStandardDynamicX02.csv --- data file from Fariss (2014)	CYLatentRepressionDynamicStandardDynamicX02.csv --- data file from Fariss (2014)	gdpv6.txt --- data file that contains the updated Gleditcsh GDP and population data	hr_treaties.csv --- data file that contains the latent treaty estimates	ModelTreatyDifferencesCAT01_VDEM.R --- R code file estimates regression models with the CAT treaty variable and VDEM human rights variables	ModelTreatyDifferencesCAT01.R --- R code file estimates regression models with the CAT treaty variable	ModelTreatyDifferencesCCPR01_VDEM.R --- R code file estimates regression models with the CAT treaty variable and VDEM human rights variables	ModelTreatyDifferencesCCPR01.R --- R code file estimates regression models with the CCPR treaty variable	ModelTreatyDifferencesCEDAW01.R --- R code file estimates regression models with the CEDAW treaty variable	ModelTreatyDifferencesCERD01.R --- R code file estimates regression models with the CERD treaty variable	ModelTreatyDifferencesCESCR01.R --- R code file estimates regression models with the CESCR treaty variable	ModelTreatyDifferencesCOUNT_VDEM.R --- R code file estimates regression models with the CAT treaty variable and VDEM human rights variables	ModelTreatyDifferencesCRC01.R --- R code file estimates regression models with the CRC treaty variable	ModelTreatyDifferencesLATENTTREATY_VDEM.R --- R code file estimates regression models with the Latent treaty variable and VDEM human rights variables	ModelTreatyDifferencesLATENTTREATY.R --- R code file estimates regression models with the Latent treaty variable	ModelTreatyDifferencesPROPORTION_VDEM.R --- R code file estimates regression models with the Proportion treaty variable and VDEM human rights variables 	ModelTreatyDifferencesTREATYCOUNT.R --- R code file estimates regression models with the count treaty variables	ModelTreatyDifferencesTREATYPROPORTION.R --- R code file estimates regression models with the proportion treaty variable	p4v2010.csv --- data file that contains the polity IV variable
	V-Dem-DS-CY-v6.1.csv --- data file that contains the VDEM human rights variables


# ---------------------------------------------------------------------------------------------------- #
# References
# ---------------------------------------------------------------------------------------------------- #

Fariss, Christopher J. 2014. “Respect for Human Rights has Improved Over Time: Modeling the Chang- ing Standard of Accountability in Human Rights Documents.” American Political Science Review 108(2):297–318.

Gleditsch, Kristian Skrede. 2002. “Expanded trade and GDP data.” Journal of Conflict Resolution 46(5):712–724.

Marshall, Monty, Keith Jaggers and Ted R. Gurr. 2013. “Polity IV Project: Political Regime Character- istics and Transitions 1800-2010 Dataset Users’ Manual.”.URL: www.systemicpeace.org/polity/polity4.htm

# ---------------------------------------------------------------------------------------------------- #
# end file
# ---------------------------------------------------------------------------------------------------- #
